package com.example.math;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class FourthScreen extends Activity implements OnClickListener {
	TextView headerText, text1;
	Button homeBtn;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);

		setContentView(R.layout.screen_four);
		getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
				R.layout.titlebar);
		Bundle extras = getIntent().getExtras();
		String textFromScreenThree = extras.getString("ThirdScreenItem");
		text1 = (TextView) findViewById(R.id.text_one);
		text1.setText(textFromScreenThree);
		homeBtn = (Button) findViewById(R.id.home_btn);
		headerText = (TextView) findViewById(R.id.header_txt);
		headerText.setText("Screen Four");
		homeBtn.setOnClickListener(this);
		findViewById(R.id.back_three).setOnClickListener(this);
		findViewById(R.id.radioButton1).setOnClickListener(this);
		findViewById(R.id.radioButton2).setOnClickListener(this);
		findViewById(R.id.radioButton3).setOnClickListener(this);
		findViewById(R.id.radioButton4).setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.back_three:
			finish();
			break;

		case R.id.home_btn:

			Intent intentHome = new Intent(this, FirstScreen.class);
			startActivity(intentHome);
			break;
		case R.id.radioButton1:

			Toast.makeText(getApplicationContext(), "Option One selected",
					Toast.LENGTH_LONG).show();
			break;
		case R.id.radioButton2:
			Toast.makeText(getApplicationContext(), "Option Two selected",
					Toast.LENGTH_LONG).show();

			break;
		case R.id.radioButton3:
			Toast.makeText(getApplicationContext(), "Option Three selected",
					Toast.LENGTH_LONG).show();

			break;
		case R.id.radioButton4:

			Toast.makeText(getApplicationContext(), "Option Four selected",
					Toast.LENGTH_LONG).show();

			break;

		default:

			break;
		}
	}
}
